<div class="chucdanhs view">
<h2><?php  __('Chức danh cán bộ');?></h2>
	
	<table class="table table-striped" style="width:50%">
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Mã chức danh'); ?></td>
			<td><?php echo $chucdanh['Chucdanh']['cd_maso']; ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Tên chức danh'); ?></td>
			<td><?php echo $chucdanh['Chucdanh']['cd_ten']; ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Ghi chú'); ?></td>
			<td><?php echo $chucdanh['Chucdanh']['ghichu']; ?>&nbsp;</td>
		</tr>
</table>
</div>
<div class="actions">
	<h3><?php __('Cập nhật'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Cập nhật chức danh', true), array('action' => 'edit', $chucdanh['Chucdanh']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Xóa chức danh', true), array('action' => 'delete', $chucdanh['Chucdanh']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $chucdanh['Chucdanh']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách chức danh', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm chức danh', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách cán bộ', true), array('controller' => 'canbos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm cán bộ', true), array('controller' => 'canbos', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Danh sách cán bộ');?></h3>
	<?php if (!empty($chucdanh['Canbo'])):?>
	<table class="table table-bordered table-consended table-hover">
	<tr class="info">
		<th><?php __('STT'); ?></th>
		<th><?php __('Mã cán bộ'); ?></th>
		<th><?php __('Họ tên'); ?></th>
		<th><?php __('Ngày sinh'); ?></th>
		<th><?php __('Nơi sinh'); ?></th>
		<th><?php __('Địa chỉ'); ?></th>
		<th><?php __('Giới tính'); ?></th>
		<th><?php __('Điện thoại'); ?></th>
		<th><?php __('Hệ số lương'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Ghi chú'); ?></th>
		<th class="actions"><?php __('Cập nhật');?></th>
	</tr>
	<?php
		$i = 0;
		$stt = 0;
		 foreach ($chucdanh['Canbo'] as $canbo):
		
		?>
		<tr>
			<td style="text-align:right"><?php echo ++$stt; ?></td>
			<td style="text-align:center"><?php echo $canbo['cb_maso'];?></td>
			<td style="text-align:center"><?php echo $canbo['cb_hoten'];?></td>
			<td style="text-align:center"><?php echo $canbo['cb_ngaysinh'];?></td>
			<td><?php echo $canbo['cb_noisinh'];?></td>
			<td><?php echo $canbo['cb_diachi'];?></td>
			<td style="text-align:center"><?php if($canbo['cb_gioitinh'] == 1) echo "Nam"; else echo "Nữ"; ?></td>
			<td style="text-align:center"><?php echo $canbo['cb_dienthoai'];?></td>
			<td style="text-align:center"><?php echo $canbo['cb_hsluong'];?></td>
			<td><?php echo $canbo['cb_email'];?></td>
			<td><?php echo $canbo['ghichu'];?></td>
			<td class="actions">
				<button class="btn btn-success" onclick="window.location.href='<?php echo Router::url(array('controller' => 'canbos', 'action' => 'view', $canbo['id']))?>'"><i class="icon-zoom-in "></i></button>
            <button class="btn btn-info" onclick="window.location.href='<?php echo Router::url(array('controller' => 'canbos', 'action' => 'edit', $canbo['id']))?>'"><i class="icon-edit "></i></button>
            <button class="btn btn-danger" onclick="if(confirm('Có chắc bạn muốn xóa cán bộ <?= $canbo['cb_hoten'] ?>?')) window.location.href='<?php echo Router::url(array('controller' => 'canbos', 'action' => 'delete', $canbo['id']))?>'"><i class="icon-trash "></i></button>

				
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Thêm cán bộ', true), array('controller' => 'canbos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
